home *** CD-ROM | disk | FTP | other *** search
/ Aminet 52 / Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso / Aminet / game / think / AmiChess.lha / AmiChess / src / null.c < prev    next >
C/C++ Source or Header  |  2002-10-31  |  435b  |  29 lines

  1. #include "common.h"
  2.  
  3. void MakeNullMove(short side)
  4. {
  5. GameRec *g;
  6. GameCnt++;
  7. g=&Game[GameCnt];
  8. g->epsq=board.ep;
  9. g->bflag=board.flag;
  10. g->hashkey=HashKey;
  11. if(board.ep>-1) HashKey^=ephash[board.ep];
  12. HashKey^=Sidehash; 
  13. board.ep=-1;
  14. board.side=1^side;
  15. g->move=NULLMOVE;
  16. }
  17.  
  18. void UnmakeNullMove(short side)
  19. {
  20. GameRec *g;
  21. side=1^side;
  22. board.side=side;
  23. g=&Game[GameCnt];
  24. board.ep=g->epsq;
  25. board.flag=g->bflag;
  26. HashKey=g->hashkey;
  27. GameCnt--;
  28. }
  29.